﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Plumbing;
using YArchitech.Controls;
using YArchitech.LIB;
using YArchitech.Plumbing;
using YArchitech.Revit;

namespace YArchitech.HVAC
{
	public partial class FormDrawParallelPipe : System.Windows.Forms.Form
	{
		public FormDrawParallelPipe(List<string> listPipeType, List<string> listPipingSystemType, Pipe pipe, Document doc)
		{
			this.listPipeType = listPipeType;
			this.listPipingSystemType = listPipingSystemType;
			this.pipe = pipe;
			this.doc = doc;
			this.InitializeComponent();
			base.CenterToScreen();
			base.Icon = Resource.YArchitechIcon;
		}

		private void FormDrawPipe_Load(object sender, EventArgs e)
		{
			this.dataGridView1.Columns[0].MinimumWidth = 30;
			this.dataGridView1.Columns[1].MinimumWidth = 105;
			this.dataGridView1.Columns[2].MinimumWidth = 43;
			this.dataGridView1.Columns[3].MinimumWidth = 43;
			this.dataGridView1.Columns[4].MinimumWidth = 50;
			this.dataGridView1.Columns[5].MinimumWidth = 140;
			this.listPipeType.Sort();
			this.listPipingSystemType.Sort();
			this.loadUserData();
			Parameter parameter = this.pipe.get_Parameter(BuiltInParameter.RBS_PIPING_SYSTEM_TYPE_PARAM);
			string name = this.doc.GetElement(parameter.AsElementId()).Name;
			FormDrawParallelPipe.structPipe.Clear();
			this.cmb_PipeInfo = new ComboBox();
			this.cmb_PipeInfo.SelectedIndexChanged += this.cmb_PipeInfo_SelectedIndexChanged;
			this.cmb_PipeInfo.TextChanged += this.cmb_PipeInfo_TextChanged;
			this.dataGridView1.Controls.Add(this.cmb_PipeInfo);
			this.cmb_PipeInfo.Visible = false;
			this.isIni = true;
		}

		private void loadUserData()
		{
			if (this.allStructPipe == null)
			{
				this.allStructPipe = new List<drawPipeStruct>();
			}
			ClassParallelPipeXMLInfo.InitializeFilePath(FormDrawParallelPipe.path, "XML");
			this.allStructPipe = ClassParallelPipeXMLInfo.raedInfoFromXML(FormDrawParallelPipe.path, "XML");
			if (this.allStructPipe.Count == 0)
			{
				int num = 1;
				foreach (string text in this.listPipingSystemType)
				{
					object[] values = new object[]
					{
						false,
						text,
						this.getUserSetInfo(text, this.pipe),
						double.Parse(this.getUserSetInfo(text, 3)) * (double)num,
						this.getUserSetInfo(text, 4),
						this.pipe.PipeType.Name.ToString()
					};
					this.dataGridView1.Rows.Add(values);
					drawPipeStruct drawPipeStruct = new drawPipeStruct();
					drawPipeStruct.IsDraw = false;
					drawPipeStruct.pipingSystemName = text;
					drawPipeStruct.levelOffSet = double.Parse(this.getUserSetInfo(text, this.pipe));
					drawPipeStruct.offSet = double.Parse(this.getUserSetInfo(text, 3)) * (double)num++;
					drawPipeStruct.pipeDiameter = double.Parse(this.getUserSetInfo(text, 4));
					drawPipeStruct.pipeTypeName = this.pipe.PipeType.Name.ToString();
					this.allStructPipe.Add(drawPipeStruct);
				}
				return;
			}
			List<string> list = new List<string>();
			for (int i = 0; i < this.allStructPipe.Count; i++)
			{
				if (!this.listPipingSystemType.Contains(this.allStructPipe[i].pipingSystemName))
				{
					list.Add(this.allStructPipe[i].pipingSystemName);
					this.allStructPipe.RemoveAt(i);
				}
				else
				{
					string text2;
					if (this.listPipeType.Contains(this.allStructPipe[i].pipeTypeName))
					{
						text2 = this.allStructPipe[i].pipeTypeName;
					}
					else
					{
						text2 = this.pipe.PipeType.Name.ToString();
					}
					object[] values2 = new object[]
					{
						this.allStructPipe[i].IsDraw,
						this.allStructPipe[i].pipingSystemName,
						this.allStructPipe[i].levelOffSet,
						this.allStructPipe[i].offSet,
						this.allStructPipe[i].pipeDiameter,
						text2
					};
					this.dataGridView1.Rows.Add(values2);
				}
			}
			this.DisplayInfo(list);
		}

		private void BindingComboBoxInfo(List<string> ItemContants, bool bEdit = false)
		{
			if (this.cmb_PipeInfo == null)
			{
				this.cmb_PipeInfo = new ComboBox();
			}
			DataTable dataTable = new DataTable();
			dataTable.Columns.Add("Value");
			dataTable.Columns.Add("Contants");
			for (int i = 0; i < ItemContants.Count; i++)
			{
				DataRow dataRow = dataTable.NewRow();
				dataRow[0] = i;
				dataRow[1] = ItemContants[i];
				dataTable.Rows.Add(dataRow);
			}
			this.cmb_PipeInfo.ValueMember = "Value";
			this.cmb_PipeInfo.DisplayMember = "Contants";
			this.cmb_PipeInfo.DataSource = dataTable;
			if (bEdit)
			{
				this.cmb_PipeInfo.DropDownStyle = ComboBoxStyle.DropDown;
				return;
			}
			this.cmb_PipeInfo.DropDownStyle = ComboBoxStyle.DropDownList;
		}

		private void cmb_PipeInfo_SelectedIndexChanged(object sender, EventArgs e)
		{
			this.dataGridView1.CurrentCell.Value = ((ComboBox)sender).Text;
		}

		private void cmb_PipeInfo_TextChanged(object sender, EventArgs e)
		{
			this.dataGridView1.CurrentCell.Value = ((ComboBox)sender).Text;
		}

		private void dataGridView1_CurrentCellChanged(object sender, EventArgs e)
		{
			try
			{
				if (this.isIni)
				{
					string text = this.dataGridView1.CurrentCell.Value.ToString();
					if (this.dataGridView1.CurrentCell.ColumnIndex == 5 || this.dataGridView1.CurrentCell.ColumnIndex == 4)
					{
						int columnIndex = this.dataGridView1.CurrentCell.ColumnIndex;
						if (columnIndex != 4)
						{
							if (columnIndex == 5)
							{
								this.BindingComboBoxInfo(this.listPipeType, false);
							}
						}
						else
						{
							Segment pipeSegmentByPipeTypeName = new OperateSegmentFitting(this.doc).GetPipeSegmentByPipeTypeName(this.dataGridView1.Rows[this.dataGridView1.CurrentCell.RowIndex].Cells[5].Value.ToString());
							List<string> list = new List<string>();
							foreach (MEPSize mepsize in pipeSegmentByPipeTypeName.GetSizes())
							{
								list.Add(Math.Ceiling(304.7 * mepsize.NominalDiameter).ToString());
							}
							this.BindingComboBoxInfo(list, true);
						}
						Rectangle cellDisplayRectangle = this.dataGridView1.GetCellDisplayRectangle(this.dataGridView1.CurrentCell.ColumnIndex, this.dataGridView1.CurrentCell.RowIndex, false);
						this.cmb_PipeInfo.Text = text;
						this.cmb_PipeInfo.Left = cellDisplayRectangle.Left;
						this.cmb_PipeInfo.Top = cellDisplayRectangle.Top;
						this.cmb_PipeInfo.Width = cellDisplayRectangle.Width;
						this.cmb_PipeInfo.Height = cellDisplayRectangle.Height;
						this.cmb_PipeInfo.Visible = true;
					}
					else
					{
						this.cmb_PipeInfo.Visible = false;
					}
				}
			}
			catch (Exception ex)
			{
				YJKMessageBox.Information(ex.Message);
			}
		}

		private void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
		{
			if (this.isIni)
			{
				if (e.ColumnIndex == 5)
				{
					Segment pipeSegmentByPipeTypeName = new OperateSegmentFitting(this.doc).GetPipeSegmentByPipeTypeName(this.dataGridView1.Rows[e.RowIndex].Cells[5].Value.ToString());
					List<double> list = new List<double>();
					foreach (MEPSize mepsize in pipeSegmentByPipeTypeName.GetSizes())
					{
						list.Add(Math.Ceiling(304.7 * mepsize.NominalDiameter));
					}
					this.dataGridView1.Rows[e.RowIndex].Cells[4].Value = this.GetCloserNum(this.dataGridView1.Rows[e.RowIndex].Cells[4].Value.ToString(), list);
				}
				this.UpdateUserdata(e.RowIndex, e.ColumnIndex);
			}
		}

		private void UpdateUserdata(int rowindex, int columnIndex)
		{
			switch (columnIndex)
			{
			case 0:
				this.allStructPipe[rowindex].IsDraw = (bool)this.dataGridView1.Rows[rowindex].Cells[columnIndex].Value;
				return;
			case 1:
				this.allStructPipe[rowindex].pipingSystemName = this.dataGridView1.Rows[rowindex].Cells[columnIndex].Value.ToString();
				return;
			case 2:
				this.allStructPipe[rowindex].levelOffSet = double.Parse(this.dataGridView1.Rows[rowindex].Cells[columnIndex].Value.ToString());
				return;
			case 3:
				this.allStructPipe[rowindex].offSet = double.Parse(this.dataGridView1.Rows[rowindex].Cells[columnIndex].Value.ToString());
				return;
			case 4:
				this.allStructPipe[rowindex].pipeDiameter = double.Parse(this.dataGridView1.Rows[rowindex].Cells[columnIndex].Value.ToString());
				return;
			case 5:
				this.allStructPipe[rowindex].pipeTypeName = this.dataGridView1.Rows[rowindex].Cells[columnIndex].Value.ToString();
				return;
			default:
				return;
			}
		}

		private PipeType Get_PipeType(Document document, string pipeTypeName)
		{
			ICollection<Element> elementByClass = YJKElementFilter.GetElementByClass(typeof(PipeType), document);
			return this.GetElementSameName(elementByClass, pipeTypeName) as PipeType;
		}

		private PipingSystemType Get_PipingSystemType(Document document, string pipingSystemTypeName)
		{
			ICollection<Element> elementByClass = YJKElementFilter.GetElementByClass(typeof(PipingSystemType), document);
			return this.GetElementSameName(elementByClass, pipingSystemTypeName) as PipingSystemType;
		}

		private Element GetElementSameName(ICollection<Element> collection, string elemName)
		{
			Element result = null;
			foreach (Element element in collection)
			{
				if (element != null && element.Name == elemName)
				{
					result = element;
				}
			}
			return result;
		}

		private string getUserSetInfo(string pst, Pipe pipe)
		{
			ClassParallelPipeXMLInfo.InitializeFilePath(FormDrawParallelPipe.path, "XML");
			List<drawPipeStruct> list = new List<drawPipeStruct>();
			list = ClassParallelPipeXMLInfo.raedInfoFromXML(FormDrawParallelPipe.path, "XML");
			string result = (pipe.get_Parameter(BuiltInParameter.RBS_OFFSET_PARAM).AsDouble() * 304.8 / 1000.0).ToString();
			if (list.Count > 0)
			{
				foreach (drawPipeStruct drawPipeStruct in list)
				{
					if (drawPipeStruct.pipingSystemName == pst)
					{
						result = drawPipeStruct.levelOffSet.ToString();
					}
				}
			}
			return result;
		}

		private string getUserSetInfo(string pst, int indexl)
		{
			ClassParallelPipeXMLInfo.InitializeFilePath(FormDrawParallelPipe.path, "XML");
			List<drawPipeStruct> list = new List<drawPipeStruct>();
			list = ClassParallelPipeXMLInfo.raedInfoFromXML(FormDrawParallelPipe.path, "XML");
			string result = "";
			if (indexl != 3)
			{
				if (indexl != 4)
				{
					return result;
				}
			}
			else
			{
				result = "200";
				if (list.Count <= 0)
				{
					return result;
				}
				using (List<drawPipeStruct>.Enumerator enumerator = list.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						drawPipeStruct drawPipeStruct = enumerator.Current;
						if (drawPipeStruct.pipingSystemName == pst)
						{
							result = drawPipeStruct.offSet.ToString();
						}
					}
					return result;
				}
			}
			result = (this.pipe.get_Parameter(BuiltInParameter.RBS_PIPE_DIAMETER_PARAM).AsDouble() * 304.8).ToString();
			if (list.Count > 0)
			{
				foreach (drawPipeStruct drawPipeStruct2 in list)
				{
					if (drawPipeStruct2.pipingSystemName == pst)
					{
						result = drawPipeStruct2.pipeDiameter.ToString();
					}
				}
			}
			return result;
		}

		private void buttonESC_Click(object sender, EventArgs e)
		{
			base.DialogResult = DialogResult.Cancel;
			base.Close();
		}

		private void buttonOK_Click(object sender, EventArgs e)
		{
			FormDrawParallelPipe.structPipe.Clear();
			Regex regex = new Regex("[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?");
			bool flag = false;
			for (int i = 0; i < this.dataGridView1.Rows.Count; i++)
			{
				if (this.dataGridView1.Rows[i].Cells[0].Value.ToString() == "True")
				{
					drawPipeStruct drawPipeStruct = new drawPipeStruct();
					drawPipeStruct.IsDraw = (bool)this.dataGridView1.Rows[i].Cells[0].Value;
					if (this.dataGridView1.Rows[i].Cells[1].Value == null)
					{
						flag = true;
						break;
					}
					drawPipeStruct.pipingSystemName = this.dataGridView1.Rows[i].Cells[1].Value.ToString();
					if (this.dataGridView1.Rows[i].Cells[2].Value == null || !regex.IsMatch(this.dataGridView1.Rows[i].Cells[2].Value.ToString()))
					{
						flag = true;
						break;
					}
					drawPipeStruct.levelOffSet = double.Parse(this.dataGridView1.Rows[i].Cells[2].Value.ToString());
					if (this.dataGridView1.Rows[i].Cells[3].Value == null || !regex.IsMatch(this.dataGridView1.Rows[i].Cells[3].Value.ToString()))
					{
						flag = true;
						break;
					}
					drawPipeStruct.offSet = double.Parse(this.dataGridView1.Rows[i].Cells[3].Value.ToString());
					if (this.dataGridView1.Rows[i].Cells[4].Value == null || !regex.IsMatch(this.dataGridView1.Rows[i].Cells[4].Value.ToString()))
					{
						flag = true;
						break;
					}
					drawPipeStruct.pipeDiameter = double.Parse(this.dataGridView1.Rows[i].Cells[4].Value.ToString());
					if (this.dataGridView1.Rows[i].Cells[5].Value == null)
					{
						flag = true;
						break;
					}
					drawPipeStruct.pipeTypeName = this.dataGridView1.Rows[i].Cells[5].Value.ToString();
					FormDrawParallelPipe.structPipe.Add(drawPipeStruct);
				}
			}
			if (!flag)
			{
				base.DialogResult = DialogResult.OK;
			}
			ClassParallelPipeXMLInfo.writestruct(FormDrawParallelPipe.path, "XML", this.allStructPipe);
			this.allStructPipe.Clear();
		}

		private void dataGridView1_CellValidated(object sender, DataGridViewCellEventArgs e)
		{
			if (this.isIni)
			{
				if (e.ColumnIndex == 5)
				{
					Segment pipeSegmentByPipeTypeName = new OperateSegmentFitting(this.doc).GetPipeSegmentByPipeTypeName(this.dataGridView1.Rows[e.RowIndex].Cells[5].Value.ToString());
					List<double> list = new List<double>();
					foreach (MEPSize mepsize in pipeSegmentByPipeTypeName.GetSizes())
					{
						list.Add(Math.Ceiling(304.7 * mepsize.NominalDiameter));
					}
					this.dataGridView1.Rows[e.RowIndex].Cells[4].Value = this.GetCloserNum(this.dataGridView1.Rows[e.RowIndex].Cells[4].Value.ToString(), list);
				}
				this.UpdateUserdata(e.RowIndex, e.ColumnIndex);
			}
		}

		private void dataGridView1_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
		{
			if (e.ColumnIndex == 2)
			{
				if (!this.regex.IsMatch(e.FormattedValue.ToString().Trim()))
				{
					YJKMessageBox.Show("输入数字格式不正确,应为正负整数或小数，且不能为空！");
					e.Cancel = true;
					this.dataGridView1.CancelEdit();
					return;
				}
				e.Cancel = false;
				return;
			}
			else
			{
				if (e.ColumnIndex != 3)
				{
					if (e.ColumnIndex == 4)
					{
						if (!this.regex2.IsMatch(e.FormattedValue.ToString().Trim()))
						{
							YJKMessageBox.Show("输入数字格式不正确,直径只能为正整数，且不能为空！");
							e.Cancel = true;
							this.dataGridView1.CancelEdit();
							return;
						}
						e.Cancel = false;
					}
					return;
				}
				if (!this.regex.IsMatch(e.FormattedValue.ToString().Trim()))
				{
					YJKMessageBox.Show("输入数字格式不正确,应为正负整数或小数，且不能为空！");
					e.Cancel = true;
					this.dataGridView1.CancelEdit();
					return;
				}
				e.Cancel = false;
				return;
			}
		}

		private void TextBox_KeyPress(object sender, KeyPressEventArgs e)
		{
			if ((e.KeyChar < '0' || e.KeyChar > '9') && e.KeyChar != '\b' && e.KeyChar != '.' && e.KeyChar != '-')
			{
				e.Handled = true;
			}
		}

		private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
		{
			e.Control.KeyPress += this.TextBox_KeyPress;
		}

		private void dataGridView1_DataError(object sender, DataGridViewDataErrorEventArgs e)
		{
		}

		private void DisplayInfo(List<string> listInfo)
		{
			string text = "以下系统当前工程没有：\n";
			foreach (string str in listInfo)
			{
				text = text + str + "\n";
			}
			if (listInfo.Count > 0)
			{
				YJKMessageBox.Information(text);
			}
		}

		private void btnNew_Click(object sender, EventArgs e)
		{
			NewParallelPipe newParallelPipe = new NewParallelPipe(this.listPipingSystemType);
			newParallelPipe.ShowDialog();
			if (newParallelPipe.DialogResult == DialogResult.OK)
			{
				if (newParallelPipe.lstselectedPs.Count == 0)
				{
					return;
				}
				foreach (string text in newParallelPipe.lstselectedPs)
				{
					drawPipeStruct drawPipeStruct = new drawPipeStruct();
					drawPipeStruct.IsDraw = true;
					drawPipeStruct.pipingSystemName = text;
					drawPipeStruct.levelOffSet = double.Parse(this.getUserSetInfo(text, this.pipe));
					drawPipeStruct.offSet = 200.0;
					drawPipeStruct.pipeDiameter = this.pipe.get_Parameter(BuiltInParameter.RBS_PIPE_DIAMETER_PARAM).AsDouble() * 304.8;
					drawPipeStruct.pipeTypeName = this.pipe.PipeType.Name.ToString();
					this.allStructPipe.Add(drawPipeStruct);
					object[] values = new object[]
					{
						drawPipeStruct.IsDraw,
						drawPipeStruct.pipingSystemName,
						drawPipeStruct.levelOffSet,
						drawPipeStruct.offSet,
						drawPipeStruct.pipeDiameter,
						drawPipeStruct.pipeTypeName
					};
					this.dataGridView1.Rows.Add(values);
					this.dataGridView1.Rows[this.dataGridView1.Rows.Count - 1].Cells[1].Selected = true;
				}
			}
		}

		private List<string> RemoveHasPipeSystem(List<string> lists)
		{
			for (int i = 0; i < this.dataGridView1.Rows.Count; i++)
			{
				lists.Remove(this.dataGridView1.Rows[i].Cells[1].Value.ToString());
			}
			return lists;
		}

		private void btnDelete_Click(object sender, EventArgs e)
		{
			this.isIni = false;
			IEnumerator enumerator = this.dataGridView1.SelectedCells.GetEnumerator();
			{
				if (enumerator.MoveNext())
				{
					int index = ((DataGridViewCell)enumerator.Current).OwningRow.Index;
					this.dataGridView1.Rows.RemoveAt(index);
					this.allStructPipe.RemoveAt(index);
				}
			}
			this.isIni = true;
		}

		private void dataGridView1_Scroll(object sender, ScrollEventArgs e)
		{
			this.cmb_PipeInfo.Visible = false;
		}

		private void btnMoveUp_Click(object sender, EventArgs e)
		{
			if (this.dataGridView1.CurrentRow.Index <= 0)
			{
				YJKMessageBox.Information("此行已在顶端，不能再上移！");
				return;
			}
			this.cmb_PipeInfo.Visible = false;
			this.isIni = false;
			int index = this.dataGridView1.CurrentRow.Index;
			drawPipeStruct selectedRowData = this.GetSelectedRowData(index);
			object[] values = new object[]
			{
				selectedRowData.IsDraw,
				selectedRowData.pipingSystemName,
				selectedRowData.levelOffSet,
				selectedRowData.offSet,
				selectedRowData.pipeDiameter,
				selectedRowData.pipeTypeName
			};
			this.dataGridView1.Rows.RemoveAt(index);
			this.dataGridView1.Rows.Insert(index - 1, values);
			this.dataGridView1.CurrentCell = this.dataGridView1.Rows[index - 1].Cells[1];
			this.allStructPipe.Clear();
			this.allStructPipe = this.GetCurrentGridData();
			this.isIni = true;
		}

		private void btnMoveDown_Click(object sender, EventArgs e)
		{
			if (this.dataGridView1.CurrentRow.Index >= this.dataGridView1.Rows.Count - 1)
			{
				YJKMessageBox.Information("此行已在底端，不能再下移！");
				return;
			}
			this.cmb_PipeInfo.Visible = false;
			this.isIni = false;
			int index = this.dataGridView1.CurrentRow.Index;
			drawPipeStruct selectedRowData = this.GetSelectedRowData(index);
			object[] values = new object[]
			{
				selectedRowData.IsDraw,
				selectedRowData.pipingSystemName,
				selectedRowData.levelOffSet,
				selectedRowData.offSet,
				selectedRowData.pipeDiameter,
				selectedRowData.pipeTypeName
			};
			this.dataGridView1.Rows.RemoveAt(index);
			this.dataGridView1.Rows.Insert(index + 1, values);
			this.dataGridView1.CurrentCell = this.dataGridView1.Rows[index + 1].Cells[1];
			this.allStructPipe.Clear();
			this.allStructPipe = this.GetCurrentGridData();
			this.isIni = true;
		}

		private string GetCloserNum(string sNum, List<double> snewNums)
		{
			if (snewNums.Count == 0)
			{
				return null;
			}
			int num = (int)short.Parse(sNum);
			double num2 = snewNums[0];
			double num3 = Math.Abs((double)num - num2);
			for (int i = 0; i < snewNums.Count; i++)
			{
				if (Math.Abs((double)num - snewNums[i]) <= num3)
				{
					num3 = Math.Abs((double)num - snewNums[i]);
					if (num2 < snewNums[i])
					{
						num2 = snewNums[i];
					}
				}
			}
			return num2.ToString();
		}

		private drawPipeStruct GetSelectedRowData(int index)
		{
			return new drawPipeStruct
			{
				IsDraw = (bool)this.dataGridView1.Rows[index].Cells[0].Value,
				pipingSystemName = this.dataGridView1.Rows[index].Cells[1].Value.ToString(),
				levelOffSet = double.Parse(this.dataGridView1.Rows[index].Cells[2].Value.ToString()),
				offSet = double.Parse(this.dataGridView1.Rows[index].Cells[3].Value.ToString()),
				pipeDiameter = double.Parse(this.dataGridView1.Rows[index].Cells[4].Value.ToString()),
				pipeTypeName = this.dataGridView1.Rows[index].Cells[5].Value.ToString()
			};
		}

		private List<drawPipeStruct> GetCurrentGridData()
		{
			List<drawPipeStruct> list = new List<drawPipeStruct>();
			for (int i = 0; i < this.dataGridView1.RowCount; i++)
			{
				list.Add(this.GetSelectedRowData(i));
			}
			return list;
		}

		private List<string> listPipeType = new List<string>();

		private List<string> listPipingSystemType = new List<string>();

		private Pipe pipe;

		private Document doc;

		public static string diameter;

		public static string offSet;

		public static int number;

		public static string levelOffSet;

		public static string pipeType;

		public static string pipingSystemType;

		public static List<drawPipeStruct> structPipe = new List<drawPipeStruct>();

		private List<drawPipeStruct> allStructPipe;

		public static string path = Path.Combine(Product.UserDataLocation, "HYDrawParallelPipeInfo.xml");

		private ComboBox cmb_PipeInfo;

		public bool isIni;

		private Regex regex = new Regex("^[+-]?[0-9]+\\d*[.]?\\d*$");

		private Regex regex2 = new Regex("^[0-9]*[1-9][0-9]*$");
	}
}
